(defmacro while (test &body body)
	   `(do
	     ()
	     ((not ,test))
	      ,@body))

(defun pow (x)
  (* x x))

(defun first-part(fur zi res)
  (let((tem ()))
    (while (< fur res)
      (cond
	((oddp zi) (push fur tem ) (setf zi (/ (- zi 1) 2)) (setf fur (pow fur))(format t "fur : ~d  " fur ))
	((evenp zi) (setf zi (/ zi 2)) (setf fur (pow fur))(format t "zi : ~d~% " zi))))
    (setf fur (* (reduce #'* tem) fur)))
  (list fur zi))

(defun prime-p (num num2 res)
  (let  ((tem (list num num2)))
    (while (= num2 1)
      (setf tem (mod (first-part (elt tem 0 ) (elt tem 1) res) res)))
    (if (= (elt tem 0 ) 1) t )))

